BIN=processpool
CC=g++
FLAGS =-c -Wall -std=c++11 # 不要把报警隐藏
LDFLAGS = -o
# SRC = $(shell ls *.cc)
SRC=$(wildcard *.cc)
OBJ=$(SRC:.cc=.o)  # 形成同名.o

$(BIN):$(OBJ)
	$(CC) $(LDFLAGS) $@ $^
%.o:%.cc #.cc依次展开形成同名.o
	$(CC) $(FLAGS) $<


.PHONY:clean
clean:
	rm -f $(BIN) $(OBJ)

.PHONY:test
test:
	@echo $(SRC)